/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kmcsoft.goldshop.model.master;

import com.kmcsoft.emaster.entity.TrackableEntity;
import com.kmcsoft.goldshop.model.exchange.DiamondExchangeDetail;
import java.util.ArrayList;
import java.util.List;
import javax.jdo.annotations.FetchGroup;
import javax.jdo.annotations.FetchGroups;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;

/**
 *
 * @author kmcsoft02
 */
@PersistenceCapable(detachable = "true", table = "SHOP_DiamondColor")
@FetchGroups(value = {
@FetchGroup(name = "detach_DiamondColor_All", members = {
    @Persistent(name = "productDiamonds"),
    @Persistent(name = "exchangeDetails")}),
@FetchGroup(name = "detach_DiamondColor_ProductDiamond", members = {
    @Persistent(name = "productDiamonds")}),
@FetchGroup(name = "detach_DiamondColor_DiamondExchange", members = {
    @Persistent(name = "exchangeDetails")})
})
public class DiamondColor extends TrackableEntity {

    @Persistent
    private String name;
    @Persistent
    private String description;
    @Persistent(mappedBy="diamondColor")
    private List<ProductDiamond> productDiamonds;
    @Persistent(mappedBy="diamondColor")
    private List<DiamondExchangeDetail> exchangeDetails;

    public DiamondColor() {
        productDiamonds = new ArrayList<ProductDiamond>();
        exchangeDetails = new ArrayList<DiamondExchangeDetail>();
    }

    
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<DiamondExchangeDetail> getExchangeDetails() {
        return exchangeDetails;
    }

    public void setExchangeDetails(List<DiamondExchangeDetail> exchangeDetails) {
        this.exchangeDetails = exchangeDetails;
    }

    public List<ProductDiamond> getProductDiamonds() {
        return productDiamonds;
    }

    public void setProductDiamonds(List<ProductDiamond> productDiamonds) {
        this.productDiamonds = productDiamonds;
    }
    
}
